FROM dolphin/tomcat:8.5.27

# set time zone
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# set locale
ENV LANG C.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

RUN rm -rf /usr/local/tomcat/webapps/*

#install dockerize


# copy start shell
COPY ./startup/startApp.sh   /app_home/bin/start.sh

# copy war
COPY ./target/cloud-rbac.war /usr/local/tomcat/webapps/cloud-rbac/
RUN unzip -o  /usr/local/tomcat/webapps/cloud-rbac/cloud-rbac.war -d /usr/local/tomcat/webapps/cloud-rbac/
RUN rm -rf /usr/local/tomcat/webapps/cloud-rbac/cloud-rbac.war


# 暴露8080端口
EXPOSE 8080

# 启动容器执行的命令
CMD bash /app_home/bin/start.sh